package com.itdao.dp.strategy.duck.holder;

import com.itdao.dp.strategy.duck.behavior.fly.impl.BadFlyBehavior;
import com.itdao.dp.strategy.duck.behavior.quack.impl.GeGeQuackBehavior;
import com.itdao.dp.strategy.duck.behavior.swim.impl.BadSwimBehavior;

public class PekingDuck extends Duck {
    public PekingDuck() {
        flyBehavior = new BadFlyBehavior();
        quackBehavior = new GeGeQuackBehavior();
        swimBehavior = new BadSwimBehavior();
    }

    @Override
    public void display() {
        System.out.println("我是北京鸭~~");
    }

    @Override
    public void fly() {
        flyBehavior.fly();
    }

    @Override
    public void quack() {
        quackBehavior.quack();
    }

    @Override
    public void swim() {
        swimBehavior.swim();
    }
}
